/**
 * Created by cc
 * Description:
 * User: CZH
 * Date: 2022-09-10
 * Time: 10:56
 */
public class TestDemo {
        public static void main1(String[] args) {
            MyArrayList myArrayList = new MyArrayList();
            myArrayList.add(0,1);
            myArrayList.add(1,2);
            myArrayList.add(2,3);
            myArrayList.add(3,4);
            myArrayList.display();
//            System.out.println(myArrayList.contains(14));
//            System.out.println(myArrayList.search(-10));
//            System.out.println(myArrayList.getPos(10));
//            myArrayList.remove(2);
            myArrayList.clear();
            System.out.println("===========");
            myArrayList.display();

        /*System.out.println(myArrayList.contains(14));
        System.out.println(myArrayList.search(-10));
        System.out.println(myArrayList.getPos(10));*/
        }


        public static void swapArray(int[] array1,int[] array2) {

            int len = Math.min(array1.length,array2.length);//abs

            for (int i = 0; i < len; i++) {
                int tmp = array1[i];
                array1[i] = array2[i];
                array2[i] = tmp;
            }
        }
        public static void main2(String[] args) {
//            int[] array1 = {1,3,5,7,9,11,13,15,17,19};
//            int[] array2 = {2,4,6,8,10};
//            swapArray(array1,array2);
//            System.out.println(Arrays.toString(array1));
//            System.out.println(Arrays.toString(array2));
        }


}
